<template>
	<view class="account-content">
		<view class="user-header">
			<u-avatar :src="src" :size="180"></u-avatar>
			<view>点击修改头像</view>
		</view>
		<view class="user-info">
			<view class="info-item">
				<view>ID</view>
				<view class="item-content">12345</view>
			</view>
			<view class="info-item">
				<view>账户身份</view>
				<view class="item-content">过客</view>
			</view>
			<view class="phone-box">
				<view>手机号码</view>
				<view class="item-content">
					<view>{{phone}}</view>
					<u-button open-type='getPhoneNumber' @getphonenumber="getphonenumber" shape="circle" size="mini" :custom-style="customStyle">一键获取</u-button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				phone:'13314411111',
				src: '',
				customStyle:{
					color:'#fff',
					background:'#2AC092'
				}
			}
		},
		methods:{
			getphonenumber(e){
				console.log(e);
			}
		}
	}
</script>

<style lang="scss">
	.account-content {
		padding-top: 20rpx;
	}

	.user-header {
		padding: 20rpx;
		background-color: #fff;
		display: flex;
		flex-direction: column;
		align-items: center;

		>view {
			margin-top: 30rpx;
		}
	}
	
	.user-info{
		margin-top: 20rpx;
		padding: 0 20rpx;
		background-color: #fff;
		
		.item-content{
			color: #999999;
		}
		.info-item{
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 20rpx 0;
			border-bottom: 1px solid #DFE0E6;
		}
		
		.phone-box{
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 20rpx 0;
			
			>view:nth-child(2){
				display: flex;
				align-items: center;
				
				>view{
					margin-right: 20rpx;
				}
			}
		}
	}
</style>